-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
merge vmimage pkg #24
Conversation
return imgName | ||
} | ||
|
||
func GetMockManager() *mocks.Manager { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about putting a test file, or initializing from calling point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't find a good place to put these code, because if initializing at calling point, then we need provoide a function to set the global instance of factory pkg with the mocked object, I think it's ugly
pkg/vmimage/utils/image.go
Outdated
err = fmt.Errorf("invalid image name: %s", fullname) | ||
return | ||
} | ||
if user == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this if
block seems can be removed?
pkg/vmimage/utils/image.go
Outdated
user = "" | ||
} | ||
parts = strings.Split(nameTag, ":") | ||
switch len(parts) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be simplified as switch parts = strings.Split(nameTag, ":"); len(parts) {
rest of them LGTM |
merge github.com/yuyang0/vmimage